package com.pwc.conversionTool.controller.sessionPersistence;

import javax.servlet.http.HttpSession;


public class BaseSessionPersistence {
	
	public static <T extends Object> T getTEntity(HttpSession session,Class<T> type,String key)
	{
		if(null==session.getAttribute(key))
		{
			return null;
		}else {
			T result= type.cast( session.getAttribute(key));
			return result;
		}		
		
	}

}
